package cn.lili.timetask.handler.impl.grab;

import cn.lili.modules.goods.client.GrabOrderClient;
import cn.lili.modules.grab.GrabNoticeParam;
import cn.lili.modules.grab.enums.SourceEnums;
import cn.lili.timetask.handler.EveryDayExecute;
import cn.lili.timetask.handler.EveryMinuteExecute;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 供应链回调
 *
 * @author Chopper
 * @since 2021/3/18 3:23 下午
 */
@Component
@RequiredArgsConstructor
@Slf4j
public class GrabOrderExecute implements EveryMinuteExecute {

    private final GrabOrderClient grabOrderClient;

    @Override
    public void execute() {
        log.info("盛创汇联-订单信息修改通知--");
        GrabNoticeParam grabParam = new GrabNoticeParam();
        grabParam.setCode(SourceEnums.XDXT_NOTICE.name());
        grabOrderClient.orderCallback(grabParam);
    }
}
